home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0527.dms / q0527.adf / fcntl.h < prev    next >
C/C++ Source or Header  |  1991-02-02  |  1KB  |  63 lines

  1.  
  2. /*
  3.  *  FCNTL.H
  4.  *
  5.  *  (c)Copyright 1990, Matthew Dillon, All Rights Reserved
  6.  */
  7.  
  8. #ifndef _FCNTL_H
  9. #define _FCNTL_H
  10.  
  11. #define O_RDONLY    0
  12. #define O_WRONLY    1
  13. #define O_RDWR        2
  14. #define O_NDELAY    4
  15. #define O_APPEND    8
  16. #define O_CREAT     0x0100
  17. #define O_TRUNC     0x0200
  18. #define O_EXCL        0x0400
  19. #define O_BINARY    0x0800
  20.  
  21. /*
  22.  *  Internal, never specify
  23.  */
  24.  
  25. #define O_INTERNAL  0xF000
  26. #define O_ISOPEN    0x1000
  27. #define O_NOCLOSE   0x2000  /*    not a closable file */
  28. #define O_CEXEC     0x4000  /*    close on exec        */
  29.  
  30. /*
  31.  *  UNIX support
  32.  */
  33.  
  34. #define F_DUPFD     1
  35. #define F_GETFD     2
  36. #define F_SETFD     3
  37. #define F_GETFL     4
  38. #define F_SETFL     5
  39.  
  40.  
  41. extern unsigned int write(int, const void *, unsigned int);
  42. extern unsigned int read(int, void *, unsigned int);
  43. extern int close(int);
  44. extern int open(const char *, int, ...);
  45. extern int creat(const char *, ...);
  46. extern long lseek(int, long, int);
  47.  
  48. extern void *fdtofh(int);
  49.  
  50. #ifdef _STDIO_H
  51. extern _IOFDS *__getfh(short);      /*  for system use only */
  52. extern _IOFDS *_MakeFD(int *);      /*  for system use only */
  53. #endif
  54.  
  55. /*
  56.  *  UNIX
  57.  */
  58.  
  59. extern int fcntl(int, int, int);
  60. extern int isatty(int);
  61.  
  62. #endif
  63.